package cn.edu.scau.cmi.mingjunhui.client;

import cn.edu.scau.cmi.mingjunhui.composite.safe.SafeComposite;
import cn.edu.scau.cmi.mingjunhui.composite.safe.SafeComponent;
import cn.edu.scau.cmi.mingjunhui.composite.safe.SafePerson;

public class SafeCompositeClient {
	public static void main(String[] args)
	{
		SafeComposite coca = new SafeComposite(null, "可口可乐");
		
		SafePerson Minute_Maid  = new SafePerson(coca, "美汁源");
		coca.addChild(Minute_Maid);
		
		SafeComposite cola = new SafeComposite(coca, "碳酸饮料");
		coca.addChild(cola);
		SafePerson kele = new SafePerson(cola, "健怡可乐");
		cola.addChild(kele);
		SafePerson xuebi = new SafePerson(cola, "雪碧");
		cola.addChild(xuebi);
		SafePerson fenta = new SafePerson(cola, "芬达");
		cola.addChild(fenta);
		
		System.out.println(coca);

	}
}
